﻿#if TASKSUPPORT
using System.Threading.Tasks;
using MugenMvvmToolkit.Annotations;
#else
using System;
#endif
using MugenMvvmToolkit.Models;

namespace MugenMvvmToolkit.Interfaces.Views
{
    /// <summary>
    ///     Represent the base interface for message box.
    /// </summary>
    public interface IMessageBox
    {
#if TASKSUPPORT
        /// <summary>
        /// Displays a message box that has a message, title bar caption, button, and icon; and that accepts a default message box result and returns a result.
        /// </summary>
        /// <param name="messageBoxText">A <see cref="T:System.String"/> that specifies the text to display.</param>
        /// <param name="caption">A <see cref="T:System.String"/> that specifies the title bar caption to display.</param>
        /// <param name="button">A <see cref="MessageBoxButtons"/> value that specifies which button or buttons to display.</param>
        /// <param name="icon">A <see cref="MessageBoxImages"/> value that specifies the icon to display.</param>
        /// <param name="defaultResult">A <see cref="MessageBoxResults"/> value that specifies the default result of the message box.</param>
        /// <returns>A <see cref="MessageBoxResults"/> value that specifies which message box button is clicked by the user.</returns>
        [SuppressTaskBusyHandler]
        Task<MessageBoxResults> ShowAsync(string messageBoxText, string caption, MessageBoxButtons button, MessageBoxImages icon,
                               MessageBoxResults defaultResult);

        /// <summary>
        /// Displays a message box that has a message, title bar caption, button, and icon; and that accepts a default message box result and returns a result.
        /// </summary>
        /// <param name="messageBoxText">A <see cref="T:System.String"/> that specifies the text to display.</param>
        /// <param name="caption">A <see cref="T:System.String"/> that specifies the title bar caption to display.</param>
        /// <param name="button">A <see cref="MessageBoxButtons"/> value that specifies which button or buttons to display.</param>
        /// <param name="icon">A <see cref="MessageBoxImages"/> value that specifies the icon to display.</param>
        /// <returns>A <see cref="MessageBoxResults"/> value that specifies which message box button is clicked by the user.</returns>
        [SuppressTaskBusyHandler]
        Task<MessageBoxResults> ShowAsync(string messageBoxText, string caption, MessageBoxButtons button, MessageBoxImages icon);

        /// <summary>
        /// Displays a message box that has a message, title bar caption, button, and icon; and that accepts a default message box result and returns a result.
        /// </summary>
        /// <param name="messageBoxText">A <see cref="T:System.String"/> that specifies the text to display.</param>
        /// <param name="caption">A <see cref="T:System.String"/> that specifies the title bar caption to display.</param>
        /// <param name="button">A <see cref="MessageBoxButtons"/> value that specifies which button or buttons to display.</param>
        /// <returns>A <see cref="MessageBoxResults"/> value that specifies which message box button is clicked by the user.</returns>
        [SuppressTaskBusyHandler]
        Task<MessageBoxResults> ShowAsync(string messageBoxText, string caption, MessageBoxButtons button);

        /// <summary>
        /// Displays a message box that has a message, title bar caption, button, and icon; and that accepts a default message box result and returns a result.
        /// </summary>
        /// <param name="messageBoxText">A <see cref="T:System.String"/> that specifies the text to display.</param>
        /// <param name="caption">A <see cref="T:System.String"/> that specifies the title bar caption to display.</param>
        /// <returns>A <see cref="MessageBoxResults"/> value that specifies which message box button is clicked by the user.</returns>
        [SuppressTaskBusyHandler]
        Task<MessageBoxResults> ShowAsync(string messageBoxText, string caption);

        /// <summary>
        /// Displays a message box that has a message, title bar caption, button, and icon; and that accepts a default message box result and returns a result.
        /// </summary>
        /// <param name="messageBoxText">A <see cref="T:System.String"/> that specifies the text to display.</param>
        /// <returns>A <see cref="MessageBoxResults"/> value that specifies which message box button is clicked by the user.</returns>
        [SuppressTaskBusyHandler]
        Task<MessageBoxResults> ShowAsync(string messageBoxText);
#else        
        /// <summary>
        /// Displays a message box that has a message, title bar caption, button, and icon; and that accepts a default message box result and returns a result.
        /// </summary>
        /// <param name="messageBoxText">A <see cref="T:System.String"/> that specifies the text to display.</param>
        /// <param name="caption">A <see cref="T:System.String"/> that specifies the title bar caption to display.</param>
        /// <param name="button">A <see cref="MessageBoxButtons"/> value that specifies which button or buttons to display.</param>
        /// <param name="icon">A <see cref="MessageBoxImages"/> value that specifies the icon to display.</param>
        /// <param name="defaultResult">A <see cref="MessageBoxResults"/> value that specifies the default result of the message box.</param>
        IOperationResult<MessageBoxResults> ShowAsync(string messageBoxText, string caption, MessageBoxButtons button, MessageBoxImages icon, MessageBoxResults defaultResult);
        
        /// <summary>
        /// Displays a message box that has a message, title bar caption, button, and icon; and that accepts a default message box result and returns a result.
        /// </summary>
        /// <param name="messageBoxText">A <see cref="T:System.String"/> that specifies the text to display.</param>
        /// <param name="caption">A <see cref="T:System.String"/> that specifies the title bar caption to display.</param>
        /// <param name="button">A <see cref="MessageBoxButtons"/> value that specifies which button or buttons to display.</param>
        /// <param name="icon">A <see cref="MessageBoxImages"/> value that specifies the icon to display.</param>
        IOperationResult<MessageBoxResults> ShowAsync(string messageBoxText, string caption, MessageBoxButtons button, MessageBoxImages icon);

        /// <summary>
        /// Displays a message box that has a message, title bar caption, button, and icon; and that accepts a default message box result and returns a result.
        /// </summary>
        /// <param name="messageBoxText">A <see cref="T:System.String"/> that specifies the text to display.</param>
        /// <param name="caption">A <see cref="T:System.String"/> that specifies the title bar caption to display.</param>
        /// <param name="button">A <see cref="MessageBoxButtons"/> value that specifies which button or buttons to display.</param>
        IOperationResult<MessageBoxResults> ShowAsync(string messageBoxText, string caption, MessageBoxButtons button);

        /// <summary>
        /// Displays a message box that has a message, title bar caption, button, and icon; and that accepts a default message box result and returns a result.
        /// </summary>
        /// <param name="messageBoxText">A <see cref="T:System.String"/> that specifies the text to display.</param>
        /// <param name="caption">A <see cref="T:System.String"/> that specifies the title bar caption to display.</param>
        IOperationResult<MessageBoxResults> ShowAsync(string messageBoxText, string caption);

        /// <summary>
        /// Displays a message box that has a message, title bar caption, button, and icon; and that accepts a default message box result and returns a result.
        /// </summary>
        /// <param name="messageBoxText">A <see cref="T:System.String"/> that specifies the text to display.</param>
        IOperationResult<MessageBoxResults> ShowAsync(string messageBoxText);
#endif
    }    
}